package [basepackage].dao.primary;

import java.util.List;
import [basepackage].bean.models.BaseJob;
import [basepackage].bean.models.BaseJobExample;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface BaseJobMapper {

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table base_job
	 * @mbg.generated
	 */
	long countByExample(BaseJobExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table base_job
	 * @mbg.generated
	 */
	int deleteByExample(BaseJobExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table base_job
	 * @mbg.generated
	 */
	@Delete({ "delete from base_job", "where id = #{id,jdbcType=BIGINT}" })
	int deleteByPrimaryKey(Long id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table base_job
	 * @mbg.generated
	 */
	@Insert({ "insert into base_job (id, job_name, ", "job_group, cron_expression, ", "is_activ, is_concurrent, ",
			"spring_name, bean_class, ", "description, create_time, ", "update_time)",
			"values (#{id,jdbcType=BIGINT}, #{jobName,jdbcType=VARCHAR}, ",
			"#{jobGroup,jdbcType=VARCHAR}, #{cronExpression,jdbcType=VARCHAR}, ",
			"#{isActiv,jdbcType=VARCHAR}, #{isConcurrent,jdbcType=VARCHAR}, ",
			"#{springName,jdbcType=VARCHAR}, #{beanClass,jdbcType=VARCHAR}, ",
			"#{description,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
			"#{updateTime,jdbcType=TIMESTAMP})" })
	int insert(BaseJob record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table base_job
	 * @mbg.generated
	 */
	int insertSelective(BaseJob record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table base_job
	 * @mbg.generated
	 */
	List<BaseJob> selectByExample(BaseJobExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table base_job
	 * @mbg.generated
	 */
	@Select({ "select", "id, job_name, job_group, cron_expression, is_activ, is_concurrent, spring_name, ",
			"bean_class, description, create_time, update_time", "from base_job", "where id = #{id,jdbcType=BIGINT}" })
	@ResultMap("[basepackage].dao.primary.BaseJobMapper.BaseResultMap")
	BaseJob selectByPrimaryKey(Long id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table base_job
	 * @mbg.generated
	 */
	int updateByExampleSelective(@Param("record") BaseJob record, @Param("example") BaseJobExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table base_job
	 * @mbg.generated
	 */
	int updateByExample(@Param("record") BaseJob record, @Param("example") BaseJobExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table base_job
	 * @mbg.generated
	 */
	int updateByPrimaryKeySelective(BaseJob record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table base_job
	 * @mbg.generated
	 */
	@Update({ "update base_job", "set job_name = #{jobName,jdbcType=VARCHAR},",
			"job_group = #{jobGroup,jdbcType=VARCHAR},", "cron_expression = #{cronExpression,jdbcType=VARCHAR},",
			"is_activ = #{isActiv,jdbcType=VARCHAR},", "is_concurrent = #{isConcurrent,jdbcType=VARCHAR},",
			"spring_name = #{springName,jdbcType=VARCHAR},", "bean_class = #{beanClass,jdbcType=VARCHAR},",
			"description = #{description,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},",
			"update_time = #{updateTime,jdbcType=TIMESTAMP}", "where id = #{id,jdbcType=BIGINT}" })
	int updateByPrimaryKey(BaseJob record);
}